#include "thread.h"
#include"QMutexLocker"
int Thread::num=0;
QMutex Thread::mutex;


Thread::Thread()
{

}

void Thread::run()
{

    for(int i=0;i<50000;i++)
    {
        QMutexLocker locker(&mutex);//自动加解锁
        //mutex.lock();
        num+=1;
       // mutex.unlock();
    }
}
